<template>
	<view>
		<view class="row">
			<text>消息类型：</text>
			<text>{{baseFormData.type||'--'}}</text>
		</view>
		<view class="row">
			<text>消息标题：</text>
			<text>{{baseFormData.title||'--'}}</text>
		</view>
		<view class="row">
			<text>创建人：</text>
			<text>{{baseFormData.realName||'--'}}</text>
		</view>
		<view class="row">
			<text>创建时间：</text>
			<text>{{baseFormData.createTime||'--'}}</text>
		</view>
		<view class="row">
			<text>消息内容：</text>
			<view class="textarea">
				{{baseFormData.messageContent||'--'}}
			</view>
		</view>
	</view>
</template>

<script>
	import {
		msgDetail
	} from '../../api/msg.js'
	import {
		log
	} from '../../common/util.js';
	export default {
		data() {
			return {
				baseFormData: {},
				
				messageParams:{noticeId:52}
			};
		},
		onLoad(option) {
			
			this.messageParams.noticeId = JSON.parse(eval(option.data)).noticeId
			console.log(this.messageParams);
			// return
			this.messageInquire()
		},
		methods: {
			messageInquire() {
				msgDetail(this.messageParams.noticeId).then(res => {
					console.log(res)
					this.baseFormData = res.data
				})
			}
		}
	}
</script>

<style lang="scss">
	.row {
		margin: 1px auto;
		padding: 30rpx;
		background-color: #EFEFEF;

		.textarea {
			text-indent: 48rpx;
			background-color: #FFFFFF;
			padding: 16rpx;
			margin: 16rpx 0;
			border-radius: 10rpx;
		}
	}
</style>